import {ADD_TODO, DELETE_TODO, SELECT_ALL, CLEAR_ALL} from './mutation-types'

export default {
  addTodo ({commit}, todo) {
    commit(ADD_TODO, {todo})
  },
  deleteTodo ({commit}, index) {
    commit(DELETE_TODO, {index})
  },
  selectAll ({commit}, check) {
    commit(SELECT_ALL, {check})
  },
  clearCompeteTodos ({commit}) {
    commit(CLEAR_ALL)
  }
}
